package com.matrix.yukun.matrix.main_module.wallpaper.adapter;

import android.widget.ImageView;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.matrix.yukun.matrix.R;
import com.matrix.yukun.matrix.main_module.entity.PhoneCategoryInfo;
import com.matrix.yukun.matrix.main_module.entity.WallpaperInfo;
import com.matrix.yukun.matrix.util.glide.GlideUtil;

import java.util.List;

public class RVWallpaperCategoryAdapter extends BaseQuickAdapter<PhoneCategoryInfo, BaseViewHolder> {

    public RVWallpaperCategoryAdapter(int layoutResId, @Nullable List<PhoneCategoryInfo> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PhoneCategoryInfo item) {
        ImageView imageView=helper.getView(R.id.iv_cover);
        helper.setText(R.id.tv_category,item.getName());
        GlideUtil.loadRoundImage(item.getCover(),imageView,1);
    }

}
